﻿//////////////////////////////////////////////////////////////////////////////////
//	Events.cs
//	Managed Wiimote 3D Library
//	Written by JungHyun Kim and JungHo Kim
//	Visit http://w3dlib.codeplex.com/
//	for more information
//////////////////////////////////////////////////////////////////////////////////
using System;

namespace Wiimote3DLibX
{
    /// <summary>
    /// 
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="args"></param>
    public delegate void Event3DHandler(object sender, Wiimote3DChangedEventArgs args);

    /// <summary>
    /// Argument sent through the WiimoteChangedEvent
    /// </summary>
    public class Wiimote3DChangedEventArgs : EventArgs, ICloneable
    {
        /// <summary>
        /// Go is IR On, Stop is IR Off
        /// </summary>
        public enum CurrentMode
        {
            /// <summary>
            /// IR이 켜짐
            /// </summary>
            Go,
            /// <summary>
            /// IR이 꺼짐
            /// </summary>
            Stop
        }

        private Point3A<double> mPt;
        private CurrentMode mMode;

        /// <summary>
        /// Get Point3D
        /// </summary>
        public Point3A<double> Point3D
        {
            get { return mPt; }
        }

        /// <summary>
        /// CurrentMode
        /// </summary>
        public CurrentMode Mode
        {
            get { return mMode; }
        }

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="Mode">Current Mode</param>
        /// <param name="pt">Ir Point</param>
        public Wiimote3DChangedEventArgs(CurrentMode Mode, Point3A<double> pt)
        {
            mPt = pt;
            mMode = Mode;
        }

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="Mode">Current Mode</param>
        public Wiimote3DChangedEventArgs(CurrentMode Mode)
        {
            mMode = Mode;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public Object Clone()
        {
            return new Wiimote3DChangedEventArgs(mMode, mPt);
        }
    }
}
